package com.wicket.okrcomponent.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcomponent.biz.service.SecurityService;
import com.wicket.okrcomponent.biz.service.dto.req.*;
import com.wicket.okrcomponent.biz.service.dto.res.*;
import com.wicket.okrcomponent.common.ro.OkrResult;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/comp/security/")
public class SecurityController {

  @Autowired
  SecurityService securityService;
/**
   * D2-3判断云端部署授权可用分析(公共)
   */
    @PostMapping("judgeCloudArrangeEmpowerAvailableCom")
    public OkrResult<JudgeCloudArrangeEmpowerAvailableComRespDto> judgeCloudArrangeEmpowerAvailableCom(@RequestBody @Validated JudgeCloudArrangeEmpowerAvailableComReqDto reqDTO){
    return OkrResult.success(securityService.judgeCloudArrangeEmpowerAvailableCom(reqDTO));
    }
/**
   * D2获取私有化或saas参数分析(公共)
   */
    @PostMapping("obtainSecurityParamAvailableCom")
    public OkrResult<ObtainSecurityParamAvailableComRespDto> obtainSecurityParamAvailableCom(@RequestBody @Validated ObtainSecurityParamAvailableComReqDto reqDTO){
    return OkrResult.success(securityService.obtainSecurityParamAvailableCom(reqDTO));
    }
/**
   * D2-3判断部署授权可用分析(公共)
   */
    @PostMapping("judgeArrangeEmpowerAvailableCom")
    public OkrResult<JudgeArrangeEmpowerAvailableComRespDto> judgeArrangeEmpowerAvailableCom(@RequestBody @Validated JudgeArrangeEmpowerAvailableComReqDto reqDTO){
    return OkrResult.success(securityService.judgeArrangeEmpowerAvailableCom(reqDTO));
    }
/**
   * D2查询安全License详情
   */
    @PostMapping("querySecurityLicenseDetail")
    public OkrResult<QuerySecurityLicenseDetailRespDto> querySecurityLicenseDetail(@RequestBody @Validated QuerySecurityLicenseDetailReqDto reqDTO){
    return OkrResult.success(securityService.querySecurityLicenseDetail(reqDTO));
    }
}
